<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象object讲解</title>
    
</head>
<body>
    <script type="text/javascript">
        // 对象 字面量创建 姓名 年龄 性别 爱好(动作)
        var person = {
            name: 'tjl',
            age: 20,
            sex: '男',
            fav: function(){
                console.log('跑步');
                return '跑步';
            }
        }
        console.log(person);
        console.log(person.name);
        console.log(person.fav());
    </script>
</body>
</html>